package hospital.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import hospital.enums.PaymentTypeEnum;
import hospital.model.order.OrderInfo;
import hospital.model.order.PaymentInfo;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

/**
 * @author
 * @description:
 */

public interface PaymentService extends IService<PaymentInfo> {
    @Transactional
    //向支付记录表添加信息
    void savePaymentInfo(OrderInfo orderInfo, Integer status);
    @Transactional
    //更新订单表，支付表，医院的状态
    void paySuccess(String out_trade_no, Map<String, String> resultMap);

    ////获取支付记录信息
    PaymentInfo getPaymentByOrderId(Long orderId, Integer status);
}
